#ifndef __BSP_FLASH_H__
#define __BSP_FLASH_H__

#include "stdint.h"

#define ADDR_FLASH_SECTOR_0 (0x08000000)
#define ADDR_FLASH_SECTOR_1 (0x08004000)
#define ADDR_FLASH_SECTOR_2 (0x08008000)
#define ADDR_FLASH_SECTOR_3 (0x0800C000)
#define ADDR_FLASH_SECTOR_4 (0x08010000)
#define ADDR_FLASH_SECTOR_5 (0x08020000)
#define ADDR_FLASH_SECTOR_6 (0x08040000)
#define ADDR_FLASH_SECTOR_7 (0x08060000)

#define BOOT_START_ADDR     0x08000000 // FLASH_START_ADDR
#define BOOT_FLASH_SIZE     0x4000     // 16K
#define APP_START_ADDR      0x08004000 // BOOT_START_ADDR + BOOT_FLASH_SIZE
#define APP_FLASH_SIZE      0x7C000    // 496K

extern void iap_function();

#endif /* __BSP_FLASH_H__ */
